package com.yaoyou.dao;

import com.yaoyou.model.dataObject.Friend;
import com.yaoyou.model.dataObject.FriendExample;
import java.util.List;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface FriendMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table FRIEND
     *
     * @mbggenerated Wed Aug 17 08:51:44 CST 2016
     */
    @SelectProvider(type=FriendSqlProvider.class, method="countByExample")
    int countByExample(FriendExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table FRIEND
     *
     * @mbggenerated Wed Aug 17 08:51:44 CST 2016
     */
    @DeleteProvider(type=FriendSqlProvider.class, method="deleteByExample")
    int deleteByExample(FriendExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table FRIEND
     *
     * @mbggenerated Wed Aug 17 08:51:44 CST 2016
     */
    @Insert({
        "insert into FRIEND (USER_ID, FRIEND_ID, ",
        "VERIFIED, CREATE_TIME)",
        "values (#{userId,jdbcType=VARCHAR}, #{friendId,jdbcType=VARCHAR}, ",
        "#{verified,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP})"
    })
    int insert(Friend record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table FRIEND
     *
     * @mbggenerated Wed Aug 17 08:51:44 CST 2016
     */
    @InsertProvider(type=FriendSqlProvider.class, method="insertSelective")
    int insertSelective(Friend record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table FRIEND
     *
     * @mbggenerated Wed Aug 17 08:51:44 CST 2016
     */
    @SelectProvider(type=FriendSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="USER_ID", property="userId", jdbcType=JdbcType.VARCHAR),
        @Result(column="FRIEND_ID", property="friendId", jdbcType=JdbcType.VARCHAR),
        @Result(column="VERIFIED", property="verified", jdbcType=JdbcType.BIT),
        @Result(column="CREATE_TIME", property="createTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<Friend> selectByExample(FriendExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table FRIEND
     *
     * @mbggenerated Wed Aug 17 08:51:44 CST 2016
     */
    @UpdateProvider(type=FriendSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") Friend record, @Param("example") FriendExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table FRIEND
     *
     * @mbggenerated Wed Aug 17 08:51:44 CST 2016
     */
    @UpdateProvider(type=FriendSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") Friend record, @Param("example") FriendExample example);
}